if __name__ == '__main__':
    # i = 1
    # while i <= 4:
    #     print("O", end="")
    #     print("*****")
    #     i = i + 1

    # j = 1
    # while 4 - j:
    #     print("O", end="")
    #     j = j + 1

    # j = 1
    # while 3 - j:
    #     print("O", end="")
    #     j = j + 1

    # j = 1
    # while 2 - j:
    #     print("O", end="")
    #     j = j + 1

    # j = 1
    # while 1 - j:
    #     print("O", end="")
    #     j = j + 1

    i = 4
    while i > 0:
        j = 1
        while (i - j) > 0:
            print(" ", end="")
            j = j + 1
        print("*****", end="")
        print()
        i = i - 1
